@file:Suppress("FINITE_BOUNDS_VIOLATION_IN_JAVA")

package xyz.labmem.base.core.base

import com.alibaba.excel.annotation.ExcelIgnore
import com.baomidou.mybatisplus.annotation.*
import com.baomidou.mybatisplus.extension.activerecord.Model
import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.annotations.ApiModelProperty
import org.apache.poi.ss.formula.functions.T
import java.io.Serializable
import java.util.*


/**
 * 国防动员基础字段，需要此通用字段的实体可继承此类
 */
open class GFBaseEntity<T : Model<*>> : Model<T>(), Serializable {

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "主键")
    @ExcelIgnore
    var id: String? = null

    /**
     * 上报时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT,value = "sub_time")
    @ApiModelProperty(value = "上报时间")
    @ExcelIgnore
    var subTime: Date? = null

    /**
     * 删除标记
     */
    @ApiModelProperty(value = "删除标记")
    @ExcelIgnore
    @TableField("delete_flag")
    var deleteFlag: String? = null

}